Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom transient pool loading #1026

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft

custom transient pool loading #1026

wants to merge 2 commits into from

Conversation

mjkzy
Copy link
Collaborator

@mjkzy mjkzy commented Jan 31, 2025

TR zone building:

  • expected to load and unload dynamically, so only include what is needed
  • build only the xmodelsurfs & xmodel into your TR zone
  • use the IMGUI debug menu to see if your default assets exist, and if your TR zone overrides them when loaded
  • your weapon file must have hasTransientAssets to true

h2_wpn_ump45_npc_tr (worldmodel)

xmodelsurfs,wpn_h2_ump45_npc_lod0
material,m/mtl_h2_ump45_base_camo
xmodel,,wpn_h2_ump45_npc

h2_wpn_ump45_vm_tr (viewmodel)

xmodelsurfs,wpn_h2_ump45_vm_lod0
material,m/mtl_h2_ump45_base_camo
xmodel,,wpn_h2_ump45_vm

in your weapon zone containing the weapon file, you need to:

  • add the xmodels used in the TR zone as a reference to your weapon zone_source so it creates blank, default assets (this goes for all transients you need to load)
  • include the materals of the weapon also, then your weapon will appear in game if invisible but loading the TR

h2_test

xmodel,,wpn_h2_ump45_vm
xmodel,,wpn_h2_ump45_npc
material,m/mtl_h2_ump45_base_camo
material,m/mtl_h2_ump45_barrel_camo
material,m/mtl_h2_ump45_sight_camo
weapon,h2_ump45_mp

@mjkzy
Copy link
Collaborator Author

mjkzy commented Jan 31, 2025

h2_post_gfx.asslist example:

{
    "pools": [
        {
            "name": "mp_viewweap",
            "memoryAllocation": 7000000,
            "zones": [
                {
                    "name": "h2_wpn_ump45_tr",
                    "assets": [
                        "wpn_h2_ump45_vm"
                    ]
                },
                {
                    "name": "h2_wpn_spas12_tr",
                    "assets": [
                        "wpn_h2_spas12_vm"
                    ]
                }
            ]
        },
        {
            "name": "mp_worldweap",
            "memoryAllocation": 7000000,
            "zones": [
                {
                    "name": "h2_wpn_ump45_tr",
                    "assets": [
                        "wpn_h2_ump45_npc"
                    ]
                },
                {
                    "name": "h2_wpn_spas12_tr",
                    "assets": [
                        "wpn_h2_spas12_npc"
                    ]
                }
            ]
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant